POV-Ray : Newsgroups : povray.general : How about $ for declare? : Re: How about $ for declare? Server Time
3 Aug 2024 00:23:40 EDT (-0400)
  Re: How about $ for declare?  
From: Doppelganger
Date: 14 Aug 2004 23:35:20
Message: <411ed9f8$1@news.povray.org>
>More comfortable work = more time to concentrate on picture itself.

this is only true for short term work. though I'm not a POV-Ray expert, my
experience with other languages in which shorthand syntax exists makes me
say that it's only "comfortable work" for 2 or 3 lines worth of code in
every 500. The code with dense shorthand easily becomes cluttered and
impossible to read.

Giving an example of how bad short hand can be in Mathematica code (and I
tried using this sort of code for serious programming -- to give up
reasonably soon afterwards):

Compare:

f[x_]=x^2;
list=Map[f,{1,2,3,4}];
Apply[Plus,list];
list

With:

Plus@@((#^2)&/@{1,2,3,4})

they both get the list {1, 2, 3, 4}, square all entries, and sum all the
entries. Which code segment do you think you'd understand for what it is 2
months after you'd written it? I had to rtfm to get the second one right to
make this point (though I wrote fluently like it when I used it), whereas
the first one came naturally.

> > Because it is a bloat-feature based in a bloat mentality
>
> ?

it's a non-feature. It's not necessary, hardly useful, and it makes (as
illustrated) for more hard than good.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.